import time
from selenium import webdriver
from selenium.webdriver.common.by import By

driver = webdriver.Chrome()
driver.get('https://ecshop.test2.shopex123.com/')

# 找到请登录按钮点击
sign = driver.find_element(By.XPATH, '//*[@id="ECS_MEMBERZONE"]/a[1]').click()


# 找到用户名的元素填写
username = driver.find_element(By.XPATH, '//*[@id="body"]/div[1]/div/div[1]/form/div[1]/div/input')
username.send_keys('wuxn')

# 找到密码的元素填写
time.sleep(2)
password = driver.find_element(By.XPATH, '//*[@id="body"]/div[1]/div/div[1]/form/div[2]/div/input')
password.send_keys('0527wu')

# 找到勾选框点击勾选
time.sleep(2)
remember_box = driver.find_element(By.XPATH, '//*[@id="remember"]').click()

# 找到登录按钮点击
time.sleep(2)
submit = driver.find_element(By.XPATH, '//*[@id="body"]/div[1]/div/div[1]/form/input[3]').click()

